<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var minSubArrayLen = function(target, nums) {
        if(nums.length === 0) return 0;
        let left = 0,right = 0;
        let sum = nums[0];
        for (++right; right <= nums.length-1; ++right) {

            console.log(1)
            // sum += nums[right];
            // if (sum-nums[left] >= target) {
            //     while (sum-nums[left] >= target && left <= right)  {
            //         left=left+1;
            //     }
            // }
            // console.log(right)
        }
        console.log({left,right})
        return right-left+1;
    };
    console.log(minSubArrayLen(4,[1,4,4]))
</script>
</body>
</html>
